<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions"%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta name="keywords" content="苏州工业园|政府服务导航系统">
<meta name="description" content="政府服务导航系统">
<meta name="author" content="lz_bth">
<title>非中心业务</title>
<link href="${pageContext.request.contextPath }/lzszcss.css"
	rel="stylesheet" type="text/css">
<script language="javascript" type="text/javascript"
	src="${pageContext.request.contextPath }/lzszjs.js"></script>
<script type="text/javascript" src="http://api.map.baidu.com/api?v=1.3"></script>
<script type="text/javascript"
	src="${pageContext.request.contextPath}/common/javascript/jquery.js"></script>

<script type="text/javascript" language="javascript">
//starttime 2012-05-31 endtime 2012-05-31
</script>
<style type="text/css">
.questionLeft {
	width: 20px;
	height: 33px;
	background: url(${pageContext.request.contextPath }/images/ques.png)
		no-repeat;
}

.questionRight {
	width: 20px;
	line-height: 33px;
	font-size: 22px;
	color: #FF8403;
	font-weight: bold;
	background: url(${pageContext.request.contextPath}/images/ques.png)
		-20px 0px repeat-x;
}

.questionCenter {
	line-height: 33px;
	font-size: 22px;
	color: #FF8403;
	font-weight: bold;
	background: url(${pageContext.request.contextPath}/images/ques.png) 0px
		-39px repeat-x;
}

td.ccc {
	border-top: 1px solid #B6847D;
	border-left: 1px solid #B6847D;
	padding: 5px;
	width: 150px;
	line-height: 25px;
	/* background: url(/onestop/images/bg.png) */
	background-color: rgb(252, 229, 231);
}

td.ddd {
	line-height: 25px;
	border-right: 1px solid #B6847D;
	border-top: 1px solid #B6847D;
	border-left: 1px solid #B6847D;
	padding: 5px;
	/* background: url(/onestop/images/bg.png) */
	background-color: rgb(217, 238, 246);
}
</style>
</head>

<body>
<table width=100% height=100%>
	<tr>
		<td valign="middle" align="center">
		<table cellpadding="0" cellspacing="0">
			<tr>
				<td colspan="2" style="text-align: center;"><img
					src="${pageContext.request.contextPath}/images/logo.png"></img></td>
			</tr>
			<tr>
				<td style="width: 256px;" valign="top"><img
					src="${pageContext.request.contextPath}/images/robo.png" /></td>
				<td style="width: 850px;" align="left" valign="top">
				<table cellpadding="0" cellspacing="0" border=0>
					<tr>
						<td colspan="5">
						<table cellpadding="0" cellspacing="0" border=0>
							<tr>
								<td class="questionLeft"></td>
								<td class="questionCenter">${matter.matterName}
								不是一站式服务中心的业务。</td>
								<td class="questionRight"></td>
							</tr>
						</table>
						</td>
					</tr>
					<tr>
						<td colspan="5">
						<table cellpadding="0" cellspacing="0" border=0>
							<tr>
								<td class="questionLeft"></td>
								<td class="questionCenter">下面为此事项的办理单位"${handleUnit.handleUnitName}"的信息</td>
								<td class="questionRight"></td>
							</tr>
						</table>
						</td>
					</tr>
					<tr>
						<td colspan="5" style="height: 10px;"></td>
					</tr>
					<tr>
						<td colspan="4"><a href="javascript:void(0);"
							onclick="$('#container3').slideUp();$('#container1').slideDown();">在地图中查看</a>
						<a href="javascript:void(0);"
							onclick="$('#container1').slideUp();$('#container3').slideDown();initMap2();">从一站式服务中心到这里</a>
						<div style="width: 650px; height: 340px; border: 1px solid gray;"
							id="container1"></div>
						<div id="container3" style="display: none;">
						<div style="width: 650px; height: 340px; border: 1px solid gray;"
							id="container2"></div>
						<table cellpadding="0" cellspacing="0" border=0>
							<tr>
								<td class="questionLeft"></td>
								<td class="questionCenter">这里可以选择您的驾车需求。</td>
								<td class="questionRight"></td>
							</tr>
						</table>
						<div id="dvPolicy"><input id="policy0" checked="true"
							type="radio" name="pickPolicy" />最少时间<input id="policy1"
							type="radio" name="pickPolicy" />最短距离<input id="policy2"
							type="radio" name="pickPolicy" />避开高速</div>
						<div id="results" style="font-size: 13px; margin-top: 10px;"></div>
						</div>
						</td>
					</tr>
					<tr>
						<td colspan="5" style="height: 10px;"></td>
					</tr>
					<tr>
						<td colspan="5">
						<table cellpadding="0" cellspacing="0" border=0 width=100%
							style="width: 650px;">
							<tbody>
								<tr>
									<td class="ddd" colspan="2">您也可以选择去百度地图中查看<a
										target="_blank" href="${handleUnit.handleUnitMapInfoLink}">${handleUnit.handleUnitName}</a></td>
								</tr>
								<tr>
									<td class="ccc">地址</td>
									<td class="ddd">${handleUnit.handleUnitAddress}</td>
								</tr>
								<tr>
									<td class="ccc">联系电话</td>
									<td class="ddd">${handleUnit.handleUnitTelephone}</td>
								</tr>
								<tr>
									<td class="ccc">投诉信箱</td>
									<td class="ddd">${handleUnit.handleUnitComplaintInfo}</td>
								</tr>
								<tr>
									<td class="ccc" style="border-bottom: 1px solid #B6847D;">业务信息网址</td>
									<td class="ddd" style="border-bottom: 1px solid #B6847D;"><a
										target="_blank" href="${handleUnit.handleUnitWebAddress }"><c:if
										test="${fn:length(handleUnit.handleUnitWebAddress)<35}">${handleUnit.handleUnitWebAddress}</c:if><c:if
										test="${fn:length(handleUnit.handleUnitWebAddress)>=35}">${fn:substring(handleUnit.handleUnitWebAddress,0,35)}......</c:if></a></td>
								</tr>
							</tbody>
						</table>
						</td>
					</tr>
				</table>
				</td>
			</tr>
		</table>
		</td>
	</tr>
</table>
<script type="text/javascript"><!--
    //创建和初始化地图函数：
    function initMap(){
		var point = new BMap.Point(${handleUnit.handleUnitMapInfo});
		var map = new BMap.Map("container1");
		map.centerAndZoom(point,18);
		map.enableScrollWheelZoom();
		map.addControl(new BMap.NavigationControl());
		//map.addControl(new BMap.MapTypeControl({anchor: BMAP_ANCHOR_TOP_RIGHT}));
		
		var marker = new BMap.Marker(point);  // 创建标注
		map.addOverlay(marker);

		var sContent =
			"<div><h4 style='margin:0 0 5px 0;padding:0.2em 0'>${handleUnit.handleUnitName}</h4>" + 
			<c:if test="${handleUnit.handleUnitName=='苏州工业园区一站式服务中心'}">
			"<img style='float:right;margin:4px' id='imgDemo' src='${pageContext.request.contextPath}/uploads/center.jpg' width='139' height='104' title='${handleUnit.handleUnitName}'/>" +
			</c:if> 
			"<p style='margin:0;line-height:1.5;font-size:13px;'>${handleUnit.handleUnitAddress}</p>" + 
			"</div>";
		var infoWindow = new BMap.InfoWindow(sContent);  // 创建信息窗口对象
		marker.openInfoWindow(infoWindow,point);
		marker.addEventListener("click", function(){          
			   this.openInfoWindow(infoWindow);
			   //图片加载完毕重绘infowindow
			   document.getElementById('imgDemo').onload = function (){
			       infoWindow.redraw();
			   }
		});
    }
<c:if test="${handleUnit.handleUnitName!='苏州工业园区一站式服务中心'}">
function search(start,end,route){ 
    var transit = new BMap.DrivingRoute(map, {
        renderOptions: {map: map,panel:"results"}, 
        policy: route
    });
    transit.search(start,end);
}
var map = null ;
function initMap2(){
	map = new BMap.Map("container2");
	map.centerAndZoom(new BMap.Point(120.68589,31.340089), 11);
	map.enableScrollWheelZoom();
	var start = "工商大厦" ,end = "苏州市卫生局",routePolicy = [BMAP_DRIVING_POLICY_LEAST_TIME,BMAP_DRIVING_POLICY_LEAST_DISTANCE,BMAP_DRIVING_POLICY_AVOID_HIGHWAYS];
	var arrInput = document.getElementById("dvPolicy").getElementsByTagName("input");
	search(start,end,routePolicy[0]);
	document.getElementById("dvPolicy").onclick = function(e){ 
	    e = e || window.event;
	    var elem = e.srcElement || e.target , policyIndex;       
	    if(elem.tagName.toLowerCase() == "input"){
	        policyIndex = elem.getAttribute("id").replace("policy","");             
	        map.clearOverlays();
	        search(start,end,routePolicy[policyIndex]);             
	    }
	}
}
</c:if>
	    
   initMap();//创建和初始化地图
    
--></script>
</body>
</html>